package com.xinghou.platform.server.api.bussiness;

import com.xinghou.platform.entity.req.ShopInfoReq;
import com.xinghou.platform.entity.resp.ShopInfoResp;
import org.springframework.dao.DataAccessException;

import java.util.List;

public interface ShopInfoBusinessService {

	/**
	 * 通过关键字模糊查询 key为关键字  frompage为起始查询条数
	 * 每次查询10条记录
	 * @param key
	 * @return
	 * @throws DataAccessException
	 */
	public List<ShopInfoResp> getShopInfoList(String key, String frompage) throws DataAccessException;


	public List<ShopInfoResp> getStoreSearchList(ShopInfoReq shopInfoReq) throws DataAccessException;
	
	
	/**
	 * 通过关键字精确查询 key为关键字  frompage为起始查询条数
	 * 每次查询10条记录
	 * @param key
	 * @return
	 * @throws DataAccessException
	 */
	public List<ShopInfoResp> getShopInfoDetailList(String key, String frompage, String userid) throws DataAccessException;

	/**
	 * 查询用户与门店 skip每次查询条数 frompage从第几条开始查
	 * @param userid
	 * @param frompage
	 * @param distance
	 * @return
	 * @throws DataAccessException
	 */
	public List<ShopInfoResp> getShopInfoDetailList(String userid, String frompage, int skip, int distance, String longitude, String latitude) throws DataAccessException;
	
	/**
	 * 查询分店信息
	 * @param userid
	 * @param shopid
	 * @throws DataAccessException
	 */
	public List<ShopInfoResp> getBranchShopInfoList(String userid, String shopid, String fromno) throws DataAccessException;
	
	/**
	 * 查询门店详细信息
	 * @param userid
	 * @param shopid
	 * @return
	 * @throws DataAccessException
	 */
	public ShopInfoResp getShopInfoDetail(String userid, String shopid)throws DataAccessException;
	
	/**
	 * 查询门店和用户的距离
	 * @param userid
	 * @param shopid
	 * @return
	 */
	public String distanceShopAndUser(String userid, String shopid);
	
	/**
	 * 添加门店详细信息
	 * @throws DataAccessException
	 */
	public int addShopInfo(ShopInfoReq shopInfoReq)throws DataAccessException;
}
